using System;
using Kollektiv.DB;

namespace Kollektiv.DataModel
{
	public class UserRepository:DataRepository<User>
	{
        public UserRepository(DataManager manager)
            : base(manager)
		{
		}
		
		public User Create (string email, string firstName, string lastName, string password, Language language)
		{
			User user = new User (){
				Email = email,
				FirstName = firstName,
				LastName = lastName,
				Password = password,
				Language = language
			};
			
			this.SaveOrUpdate (user);
			
			return user;
		}
	}
}

